<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>margin</title>
    <style type="text/css">
        .box {
            width: 300px;
            height: 300px;
            background-color: peru;
            margin: 50px auto; /* 左右居中 */
        }
        body{
            margin: 0px; /* 不指定为0 则body默认有8px*/
        }
        .box1 {
            width: 300px;
            height: 300px;
            background-color: darkorange;
            margin-left: 200px;
            border-radius: 50px;
        }
        .box2 {
            height: 300px;
            width: 300px;
            background-color: green;
            margin-left: 400px;
            margin-top: -100px;
            border-radius: 50px;
            float: left;
        }
        .box2:hover{
            background-color: cornsilk;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="box1"></div>
    <div class="box2"></div>
    <p class="box1"></p>
</body>
</html>